import request from "@/utils/request";

/**
 * 查询全部轮播图信息
 * @returns {AxiosPromise}
 */
export function queryAll() {
  return request({
    url: "rest/api/carousel/manager/all",
    method: "get"
  });
}

/**
 * 分页查询轮播图信息
 * @param params
 * @returns {AxiosPromise}
 */
export function queryAllByPager(params) {
  return request({
    url: "rest/api/carousel/manager",
    method: "get",
    params
  });
}

export function queryEntity(params) {
  return request({
    url: "rest/api/carousel/manager/entity",
    method: "get",
    params
  });
}

/**
 * 保存轮播图信息
 * @param data
 * @returns {AxiosPromise}
 */
export function saveCarousel(data) {
  return request({
    url: "rest/api/carousel/manager",
    method: "post",
    data
  });
}

/**
 * 更新轮播图信息
 * @param data
 * @returns {AxiosPromise}
 */
export function updateCarousel(data) {
  return request({
    url: "rest/api/carousel/manager/update",
    method: "post",
    data
  });
}

/**
 * 删除轮播图信息
 * @param data
 * @returns {AxiosPromise}
 */
export function deleteCarousel(data) {
  return request({
    url: "rest/api/carousel/manager/del",
    method: "post",
    data
  });
}
